package client.ui.view.base;

import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class FrameBase extends JFrame implements WindowListener {
    private String name;
    public static final List<JFrame> frameBaseList = new ArrayList<>();
    public FrameBase() throws HeadlessException {

    }

    public FrameBase(String title) throws HeadlessException {
        super(title);
    }

    @Override
    protected void frameInit() {
        super.frameInit();
        frameBaseList.add(this);
    }



    public void updatePanel(String panelName){

    }

    @Override
    public void windowOpened(WindowEvent e) {

    }

    @Override
    public void windowClosing(WindowEvent e) {

    }

    @Override
    public void windowClosed(WindowEvent e) {
        FrameBase.frameBaseList.remove(this);
    }

    @Override
    public void windowIconified(WindowEvent e) {

    }

    @Override
    public void windowDeiconified(WindowEvent e) {

    }

    @Override
    public void windowActivated(WindowEvent e) {

    }

    @Override
    public void windowDeactivated(WindowEvent e) {

    }
}
